public interface DogState {
    public void showState();
}
class softlyState implements DogState{
    public void showState(){
        System.out.println("在主人面前,听主人的命令。");
    }
}
class MeetEnemyState implements DogState{
    @Override
    public void showState() {
        System.out.println("遇到敌人狂叫,并冲上去狠咬敌人。");
    }
}
class MeetFriendState implements DogState{
    @Override
    public void showState() {
        System.out.println("遇到朋友晃动尾巴,表示欢迎。");
    }
}
